<?xml version="1.0" encoding ="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 1.0 Transitional//EN" "http://www.w3.org/TR/htmL1/DTD/xhtml1-transitional.dtd">

<%@ page contentType="text/html; charset=utf-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="display" uri="http://displaytag.sf.net"%>
<%@ taglib prefix="aa" uri="http://ajaxanywhere.sourceforge.net/"%> 
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>학교법인 서강대학교 회계관리 시스템</title>
<link rel="stylesheet" type="text/css" href="/inc/css/common.css">
<script type="text/javascript" src="/inc/js/common.js"></script>
<script type="text/javascript">
	function search_cust(type) {
		if(type == "unit"){
			dojo.event.topic.publish("show_buil");
		}
	}	
	function submit_custno(obj){
		var objlength=obj.length;
		var idx=getRadioIndex(obj);
		var openerform = eval("opener."+form.form_nm.value);
		var openerele_nm = eval("openerform."+form.ele_nm.value);
		var openerhdn_nm = eval("openerform."+form.hdn_nm.value);
		if(objlength>1){
			openerele_nm.readonly=true;
			openerele_nm.value=form.cust_nm[idx].value;
			openerhdn_nm.value=form.cust_no[idx].value;
		}else{
			openerele_nm.readonly=true;
			openerele_nm.value=form.cust_nm.value;
			openerhdn_nm.value=form.cust_no.value;
		}
		self.close();
	}

</script>
<s:head theme="ajax"/>
<link rel="stylesheet" href="style/style.css" type="text/css" />
</head>
<body >
	<s:form name="form" theme="simple" id="searche_form" >
<div id="popup_550se_top"></div>
<div id="popup_550se_bg">
	<table class="pop550se_Tbl">
	<s:hidden name="result" />
	
	<s:hidden name="form_nm" />
	<s:hidden name="ele_nm" />
	<s:hidden name="hdn_nm" />
	
	<tr>
		<th>거래처명</th>
		<td><input type="text" name="searchText" id=searchText value="<s:property value="searchText" />" Class="input_120se"/> 
		<s:submit value="조회" type='image' src="/images/btn_search03.gif" action="searchCustno" />
		</td>
	</tr>
		<tr>
		<td colspan=2>
		<aa:zone name="listTable">
			<display:table name="custMast" uid="row" requestURI="searchCustnoPopup.action"  class="pop550se_Tbl">
				<display:setProperty name="basic.msg.empty_list" value="조회된 데이터가 없습니다."/>
				<display:column title="선택" ><input type="radio" id="selectradio" name="radioSelect" value="<s:property value="%{#attr.row.cust_no}"/>" onclick="submit_custno(form.radioSelect)" /></display:column>									
				<display:column title="거래처코드"  property="cust_no" sortable="fale" sortProperty="title"/>
				<display:column class="hidden" headerClass="hidden"><s:hidden id="cust_no" name="cust_no" value="%{#attr.row.cust_no}"/></display:column>
				<display:column title="거래처명" property="cust_nm" sortable="fale" sortProperty="title"/>				
				<display:column class="hidden" headerClass="hidden"><s:hidden id="cust_nm" name="cust_nm" value="%{#attr.row.cust_nm}"/></display:column>		
			</display:table>
		</aa:zone>
		</td>
	</tr>
	</table>
</div>

<!---------------Bottom : STR----------->
<div id="popup_550se_bottom"><s:submit value="닫기" type='image' src="/images/pop_btn_close.gif" onclick="window.close();" /></div>
<!---------------Bottom : END----------->
</s:form>
</body>
</html>